package mest.dao.LGF.WarehouseTakeMaterial;

import mest.VO.LGF.WarehouseTakeMaterial.warehouse_productjob_takeMaterialVO;
import mest.VO.LGF.WarehouseTakeMaterial.warehouse_productjob_takematerial_recordVO;
import mest.VO.LGF.WarehouseTakeMaterial.warehouse_takeMaterialVO;
import mest.VO.LGF.WarehouseWorkFinish.warehouse_productjob_workfinish_recordVO;
import mest.entity.warehouse_productjob_takematerial_record;
import mest.entity.warehouse_productjob_workfinish_record;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Description
 * @auther Machenike
 * @create 2019-12-22 18:59
 */
public interface IWarehouseTakeMaterialDao {
    //1.未完成基本查询-数量
    int countNOFinish(@Param("theirDb") String theirDb);

    //2.未完成基本查询-分页
    List<warehouse_takeMaterialVO> selectAllNOFinish(@Param("theirDb") String theirDb, @Param("index") int index, @Param("pageSize") int pageSize);

    //3.已完成基本查询-数量
    int countFinish(@Param("theirDb") String theirDb);

    //4.已完成基本查询-分页
    List<warehouse_takeMaterialVO> selectAllFinish(@Param("theirDb") String theirDb,@Param("index") int index, @Param("pageSize") int pageSize);

    //1级弹出层查看完工情况--分页
    List<warehouse_productjob_takeMaterialVO> selectTakeMaterialDetail(@Param("theirDb") String theirDb, @Param("wtId") int wtId , @Param("index") int index, @Param("pageSize") int pageSize);
//    //1级弹出层查看完工情况--数量
    int selectTakeMaterialDetailCount(@Param("theirDb") String theirDb,@Param("wtId") int wwId);

    //2级弹出层查看出库往期记录--分页
    List<warehouse_productjob_takematerial_recordVO> selectTakeMaterialOutPastRecord(@Param("theirDb") String theirDb, @Param("wptId") int wpwId, @Param("index") int index, @Param("pageSize") int pageSize);
    //2级弹出层查看入库往期记录--数量
    int selectTakeMaterialOutPastRecordCount(@Param("theirDb") String theirDb,@Param("wptId") int wpwId);

    //完工入库增加入库记录
    int addRecord(warehouse_productjob_takematerial_recordVO wptr)  throws Exception;
    //添加记录后更新hasbeenNumber
    int updatehasBeenNumber(warehouse_productjob_takematerial_recordVO wptr)  throws Exception;

    int updateByWTId(@Param("theirDb") String theirDb,@Param("wtId") int ppmId,@Param("finishStatus")int status) throws Exception;

	Map<String, Object> existWarehouseSave(warehouse_productjob_takematerial_recordVO wptr);

	int updateWarehouseSave(warehouse_productjob_takematerial_recordVO wptr);

	int insertWSRecord(warehouse_productjob_takematerial_recordVO wptr);

}
